//获取应用实例
const app = getApp();
// 引入AES.js
var baseJs = require("../../common/base.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    uid:"",
    // 
    isInstalments:"0",
    orderM:"",
    payInfo:"",
    storeName:"",
    orderNumber:"",
    remark:"",
    // 
    instalmentsData:"",


  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options);
    this.setData({
      uid: wx.getStorageSync('uid'),
      isInstalments: options.isFenQi,
      orderM: options.orderM,
      payInfo: options.payInfo,
      storeName: options.storeName,
      orderNumber: options.orderNumber,
      remark:options.remark

    })
    if (this.data.isInstalments == "1"){
      this.GetInstalmentsOrderInComeList();
    }
  },

 
  GetInstalmentsOrderInComeList: function () {
    var that = this;
    var uid = this.data.uid;
    var orderNumber = this.data.orderNumber;
    wx.request({
      url: baseJs.api + baseJs.encryUrl("method=GetInstalmentsOrderInComeList&UID=" + uid + "&OrderNumber=" + orderNumber),
      success: function (res) {
        var json = JSON.parse(baseJs.decryUrl(res.data));
        console.log(json);
        if (json.ResultFlag == 1) {
          that.setData({
            instalmentsData: json.ResultData
          })
        }
      }
    })
  },
})